package org.bigjava.novelplatform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.bigjava.novelplatform.common.enums.PositionState;
import org.bigjava.novelplatform.common.enums.ReceiveType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @TableName discounts
 */
@TableName(value ="discounts")
@Data
public class Discounts implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 创建时间，自动
     */
    private Date createTime;

    /**
     * 生效时间
     */
    private Date forceTime;

    /**
     * 截至时间
     */
    private Date deadlineTime;

    /**
     * 0需要领取<br />1自动发放
     */
    private ReceiveType receiveType;

    /**
     * 特定用户类型

     */
    private Integer scopeUserType;

    /**
     * 优惠类型0章节1打赏
     */
    private Integer scopeType;

    /**
     * 特定书籍优惠
     */
    private Integer scopeBookId;

    /**
     * 特定作者书籍优惠
     */
    private Integer scopeWriterId;

    /**
     * 特定类型书籍优惠
     */
    private Integer scopeCatalogId;

    /**
     * 特定作者积分优惠
     */
    private Integer scopeIntegralWriterId;

    /**
     * \>=1减价<br />0<x<1折扣<br />-1订单免费
     */
    private BigDecimal discounts;

    /**
     * 是否可叠加
     0不可叠加；1可叠加
     */
    private PositionState superposition;

    /**
     * 逻辑删除
     0未删除；1删除
     */
    private Integer deleteState;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}